package com.hk.service.sys.impl;

import org.springframework.stereotype.Service;

import com.hk.commons.LongId;
import com.hk.commons.entity.sys.SysRole;
import com.hk.dao.base.impl.BaseServiceImpl;
import com.hk.service.sys.ISysRole;

@Service
public class SysRoleImpl extends BaseServiceImpl<SysRole> implements ISysRole {

	@Override
	public SysRole findById(Long id) {
		return getById(id);
	}

	@Override
	public SysRole delete(Long id) {
		SysRole role = new SysRole();
		role.setId(id);
		delete(role);
		return role;
	}

	@Override
	public Long add(SysRole model) {
		Long id = LongId.get();
		model.setId(id);
		save(model);
		return id;
	}

}
